package com.xiaofeng.pochi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaofeng.pochi.pojo.ShopProduct;
import com.xiaofeng.pochi.pojo.ShopProductPack;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 *
 * @Author: chc
 * @Date: 2022/08/13/22:33
 * @Description:
 */
@Component
public interface ShopProductPackMapper extends BaseMapper<ShopProductPack> {
    /**
     * 批量保存
     * @param packList
     */
    void saveBatch(List<ShopProductPack> packList);

    /**
     * 格局id删除商品套装表
     * */
    void deleteByPackCode(long packCode);

    /**
     * 根局id查询商品套装表
     * */
    List<ShopProductPack> getByPackCode(Long id);

    /**
     * 根据商品ID查询
     * @param productId
     * @return
     */
    ShopProductPack getByProductId(Long productId);

    /**
     * 根据商品ID集合删除
     * @param productIds
     * @return
     */
    void deleteByProductIds(List<Long> productIds);

    /**
     * 根据商品ID集合查询
     * @param productIds
     * @return
     */
    List<ShopProductPack> getByProductIds(List<Long> productIds);
}
